#
#  playList.rb
#  TunesServer
#
#  Created by Tom Demeyer on 3/27/08.
#  Copyright (c) 2008 __MyCompanyName__. All rights reserved.
#

class PlayList

  attr_accessor :name
  attr_reader :tracks
  
  @@all = []
  
  def self.all
    return @@all;
  end
  
  def self.playList(name) 
	@@all.each do |l|
		if( l.name == name )
		 return l
		end
	end
	return nil
  end
  
  def initialize(name)
    @name = name
    @tracks = []
	@@all << self
  end

  def addTrack(t)
    @tracks << t
  end
  
end
